package com.yunxi.controller.otd;

import com.yunxi.otd.pojo.OtdOrderCirEditVO;
import com.yunxi.otd.pojo.OtdOrderCirScheduleQueryVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.yunxi.core.web.ResponseUtil;
import com.yunxi.core.web.CurrentUser;
import com.yunxi.core.web.ApiResult;
import com.yunxi.core.web.LoginInfo;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import com.yunxi.otd.service.OtdOrderCirMonthDubboService;
import com.yunxi.otd.pojo.OtdOrderCirMonthVO;

/**
* <p>
* 月预测CIR 前端控制器
* </p>
*
* @author XUQI
* @since 2019-10-15
*/
@RestController
@RequestMapping("/admin/cir/month")
@Api(tags = "OTD:CIRMONTH", description = "月预测CIR接口")
public class OtdOrderCirMonthController {

    private static final Logger logger = LoggerFactory.getLogger(OtdOrderCirMonthController.class);

    @Autowired
    OtdOrderCirMonthDubboService otdOrderCirMonthDubboService;

    @GetMapping("/page")
    @ApiOperation(value = "CIR日排程查询")
    public ApiResult page(OtdOrderCirScheduleQueryVO queryVO) {
        return otdOrderCirMonthDubboService.findCirSchedule(queryVO);
    }

    @GetMapping("/week")
    @ApiOperation(value = "月CIR分周排程查询")
    public ApiResult queryMonthCirWeekly(OtdOrderCirScheduleQueryVO queryVO) {
        return otdOrderCirMonthDubboService.findMonthCirWeekly(queryVO);
    }

    @PostMapping("/edit")
    @ApiOperation(value = "CIR数量编辑")
    public ApiResult edit(@RequestBody OtdOrderCirEditVO editVO) {
        return otdOrderCirMonthDubboService.editOrderNum(editVO);
    }

}
